package com.example.octopus.service;

import com.example.octopus.entity.WeixinAccessToken;
import com.example.octopus.entity.returnMessage.SelectReturnMessage;
import com.example.octopus.entity.returnMessage.DeleteReturnMessage;
import com.example.octopus.entity.returnMessage.InsertReturnMessage;
import com.example.octopus.entity.returnMessage.SelectReturnMessage;
import com.example.octopus.entity.returnMessage.UpdateReturnMessage;

import java.util.List;
import java.util.Map;

public interface DataBaseService {


    WeixinAccessToken getWeixinAccessToken();

    public <T>InsertReturnMessage insert(String collection, String env, List<T> data);

    public DeleteReturnMessage delete(String collection, String env, Map<String, Object> condition);
    public SelectReturnMessage select(String collection, String env, Map<String, Object> condition, int limit, int offset);

    SelectReturnMessage select(String collection, String env, int page);

    SelectReturnMessage select(String collection, String env, Map<String, Object> condition, int page);

    SelectReturnMessage select(String collection, String env, Map<String, Object> condition);

    SelectReturnMessage select(String collection, String env);

    public  UpdateReturnMessage update(String collection, String env, String docId, Object data);

    SelectReturnMessage select(String collection, String env, String condition);
}
